<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
		<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="TitleName" class="mui-title">景点明信片</h1>
		</header>

		<nav class="mui-bar mui-bar-tab">
			<a id="sendNav" class="mui-tab-item">
				<span class="mui-icon mui-icon-compose"></span>
				<span class="mui-tab-label">寄出去</span>
			</a>
			<a id="circleNav" class="mui-tab-item">
				<span class="mui-icon mui-icon-mic"></span>
				<span class="mui-tab-label">语音导游</span>
			</a>
			<a id="gotoNav" class="mui-tab-item">
				<span class="mui-icon mui-icon-navigate"></span>
				<span class="mui-tab-label">前往</span>
			</a>
		</nav>
		<script type="text/javascript" charset="utf-8">
			mui.plusReady(function() {
				var web = plus.webview.currentWebview();
				var cardId = web.cid;
				var ak = web.ak;
				var akId = null;
				var aurl = web.aurl;
				var lng = web.lng;
				var lat = web.lat;
				var name = web.name;
				document.getElementById("TitleName").innerHTML = name + "明信片";
				if (ak != null || ak != undefined || ak != '') {
					akId = ak.replace(/-/g, '_');
				}
				var articlePage = mui.preload({
					"id": akId,
					"url": aurl,
					styles: {
						top: '45px', //mui标题栏默认高度为45px；
						bottom: '45px' //默认为0px，可不定义；
					}
				});
				
				articlePage.addEventListener('loaded', function() {
    				setTimeout(function(){
    					web.show();
        				articlePage.show();
        				//关闭等待框
    					plus.nativeUI.closeWaiting();
    				},50);
				});
				
				var stampPage = mui.preload({
					"id": 'stamp_html',
					"url": 'stamp.html'
				});
				
				var circlePage = mui.preload({
					"id": 'circle_nav',
					"url": 'circle.html'
				});
				
				var gotopagePage = mui.preload({
					"id": 'gotopage',
					"url": 'goto.html',
					extras: {
						lng: lng,
						lat: lat,
						name: name
					}
				});
				//---- 寄出去
				mui('.mui-bar-tab').on('tap', '#sendNav', function() {
					stampPage.show();
				});
				//---- 前往
				mui('.mui-bar-tab').on('tap', '#gotoNav', function() {
					gotopagePage.show();
				});
				//---- 圈子
				mui('.mui-bar-tab').on('tap', '#circleNav', function() {
					circlePage.show();
				});
				//
			});
		</script>
	</body>

</html>